package com.atguigu.springcloud.alibaba.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class ConfigClientController {
    //todo 经过测试读取的 并非3344 application.yml配置文件的东西
    //todo 读取的是gitee 配置文件里的东西
    @Value("${config.info}")
    private String configInfo;

    @Value("${server.port}")
    private String serverPort;

    @Value("${ls.name}")
    private String msg;

    @GetMapping("/configInfo")
    public String getConfigInfo() {
        return configInfo;
    }

    @GetMapping("/serverPort")
    public String getServerPort() {
        return serverPort;
    }

    @GetMapping("/msg")
    public String getMsg() {
        return msg;
    }


}